package router

import (
	"github.com/gin-gonic/gin"
	"lab.com/controller"
	"lab.com/middleware"
)

func initFileRouter(e *gin.Engine) {
	fileControl := controller.File
	fileRouter := e.Group("/file").Use(middleware.Authentication())
	//文件(夹)列表
	fileRouter.GET("list", fileControl.FileList)
	//文件(夹)新增
	fileRouter.POST("add", fileControl.FileAdd)
	//文件(夹)重命名
	fileRouter.POST("rename", fileControl.FileRename)
	//文件删除
	fileRouter.POST("delete", fileControl.FileDelete)
	//文档编辑
	fileRouter.POST("edit", fileControl.FileEdit)
	//文件夹权限修改
	fileRouter.POST("access/edit", fileControl.FileAccessEdit)

}
